<!dotype html>
<html>
<head>
    <script src="bower_components/bootstrap/js/modal.js"></script>
</head>
<body>
    <nav class="navbar navbar-default navbar-fixed-top">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="./">MarkDown在线编辑器实验室</a>
			</div>
			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav navbar-right">
					<?php
                        if (isset($_COOKIE["username"])){
                            echo "<li><a>欢迎 <b>" . $_COOKIE["username"] . "</b> !</a></li>";
                            echo "<li class='dropdown text-center'>
          <a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>常用工具<span class='caret'></span></a>
          <ul class='dropdown-menu text-center'>
            <li><a href='ch_pass.php'>修改密码</a></li>
            <li><a href='myfile.php'>我的文件</a></li>
            <li><a href='create.php'>创建新文件</a></li>
            <li><a href='logout.php'>注销</a></li>
          </ul></li>";
                        }else{
                            echo "<li><a href='./login.php'>登录</a></li>
					<li><a href='./reg.php'>注册</a></li>";
                        }
                    
                    ?>
                    
                    <li><a href="./dev">网站更新日志</a></li>
					<li><a href="http://blog.wl27.cn" target="_blank">@zhonger</a></li>
				</ul>
			</div>
		</div>
	</nav>
</body>
</html>